import { queryPage } from "@/api/test/test";

export const tableOption = function () {
  const me = this;
  return {
    apiRequest: queryPage,
    autoRequest: false,
    tableConfig: {
      // border: false,
    },
    tableEvents: {
      // "selection-change": (e) => {
      //   console.log(e, me);
      // },
      // "row-click": me.rowClick,
    },
    paginationConfig: {
      // layout: "pager,total",
    },
    paginationEvents: {
      // "next-click": (...e) => {
      //   console.log(...e);
      // },
    },
    column: [
      {
        type: "selection",
        // selectable: function (row) {
        //   return row.taskName !== "已完成";
        // },
      },
      { label: "序号", type: "index" },
      {
        label: "船舶名称",
        prop: "shipId",
        dicData: me.shipArr,
      },
      { label: "航次号", prop: "voyageNumber", slot: true },
      { label: "始发港", prop: "departurePort" },
      { label: "目的港", prop: "destinationPort" },
      { label: "做成人", prop: "dealPerson" },
      { label: "做成日期", prop: "dealTime" },
      { label: "状态", prop: "taskName" },
      { label: "操作", prop: "menu", width: "150", slot: true },
    ],
  };
};
